package com.ymttest.database.mapping;

import com.ymttest.database.model.YmtSecKillStockConfig;
import com.ymttest.database.model.YmtSecKillStockConfigExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface YmtSecKillStockConfigMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table YMT_SecKillStockConfig
     *
     * @mbggenerated Wed Mar 11 18:49:41 CST 2020
     */
    @DeleteProvider(type=YmtSecKillStockConfigSqlProvider.class, method="deleteByExample")
    int deleteByExample(YmtSecKillStockConfigExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table YMT_SecKillStockConfig
     *
     * @mbggenerated Wed Mar 11 18:49:41 CST 2020
     */
    @Delete({
        "delete from YMT_SecKillStockConfig",
        "where SecKillStockConfigId = #{secKillStockConfigId,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer secKillStockConfigId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table YMT_SecKillStockConfig
     *
     * @mbggenerated Wed Mar 11 18:49:41 CST 2020
     */
    @Insert({
        "insert into YMT_SecKillStockConfig (SecKillStockConfigId, ActivityId, ",
        "ProductId, UserId, ",
        "Action, CreateTime, ",
        "UpdateTime)",
        "values (#{secKillStockConfigId,jdbcType=INTEGER}, #{activityId,jdbcType=INTEGER}, ",
        "#{productId,jdbcType=VARCHAR}, #{userId,jdbcType=INTEGER}, ",
        "#{action,jdbcType=BIT}, #{createTime,jdbcType=TIMESTAMP}, ",
        "#{updateTime,jdbcType=TIMESTAMP})"
    })
    int insert(YmtSecKillStockConfig record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table YMT_SecKillStockConfig
     *
     * @mbggenerated Wed Mar 11 18:49:41 CST 2020
     */
    @InsertProvider(type=YmtSecKillStockConfigSqlProvider.class, method="insertSelective")
    int insertSelective(YmtSecKillStockConfig record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table YMT_SecKillStockConfig
     *
     * @mbggenerated Wed Mar 11 18:49:41 CST 2020
     */
    @SelectProvider(type=YmtSecKillStockConfigSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="SecKillStockConfigId", property="secKillStockConfigId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="ActivityId", property="activityId", jdbcType=JdbcType.INTEGER),
        @Result(column="ProductId", property="productId", jdbcType=JdbcType.VARCHAR),
        @Result(column="UserId", property="userId", jdbcType=JdbcType.INTEGER),
        @Result(column="Action", property="action", jdbcType=JdbcType.BIT),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<YmtSecKillStockConfig> selectByExample(YmtSecKillStockConfigExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table YMT_SecKillStockConfig
     *
     * @mbggenerated Wed Mar 11 18:49:41 CST 2020
     */
    @Select({
        "select",
        "SecKillStockConfigId, ActivityId, ProductId, UserId, Action, CreateTime, UpdateTime",
        "from YMT_SecKillStockConfig",
        "where SecKillStockConfigId = #{secKillStockConfigId,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="SecKillStockConfigId", property="secKillStockConfigId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="ActivityId", property="activityId", jdbcType=JdbcType.INTEGER),
        @Result(column="ProductId", property="productId", jdbcType=JdbcType.VARCHAR),
        @Result(column="UserId", property="userId", jdbcType=JdbcType.INTEGER),
        @Result(column="Action", property="action", jdbcType=JdbcType.BIT),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    YmtSecKillStockConfig selectByPrimaryKey(Integer secKillStockConfigId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table YMT_SecKillStockConfig
     *
     * @mbggenerated Wed Mar 11 18:49:41 CST 2020
     */
    @UpdateProvider(type=YmtSecKillStockConfigSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") YmtSecKillStockConfig record, @Param("example") YmtSecKillStockConfigExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table YMT_SecKillStockConfig
     *
     * @mbggenerated Wed Mar 11 18:49:41 CST 2020
     */
    @UpdateProvider(type=YmtSecKillStockConfigSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") YmtSecKillStockConfig record, @Param("example") YmtSecKillStockConfigExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table YMT_SecKillStockConfig
     *
     * @mbggenerated Wed Mar 11 18:49:41 CST 2020
     */
    @UpdateProvider(type=YmtSecKillStockConfigSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(YmtSecKillStockConfig record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table YMT_SecKillStockConfig
     *
     * @mbggenerated Wed Mar 11 18:49:41 CST 2020
     */
    @Update({
        "update YMT_SecKillStockConfig",
        "set ActivityId = #{activityId,jdbcType=INTEGER},",
          "ProductId = #{productId,jdbcType=VARCHAR},",
          "UserId = #{userId,jdbcType=INTEGER},",
          "Action = #{action,jdbcType=BIT},",
          "CreateTime = #{createTime,jdbcType=TIMESTAMP},",
          "UpdateTime = #{updateTime,jdbcType=TIMESTAMP}",
        "where SecKillStockConfigId = #{secKillStockConfigId,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(YmtSecKillStockConfig record);
}